package com.yunchang.springboot.mapper.mwsutils;

import com.yunchang.springboot.models.mwsutils.CwfzFinancialSubjects;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CwfzFinancialSubjectsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CwfzFinancialSubjects record);

    int insertSelective(CwfzFinancialSubjects record);

    CwfzFinancialSubjects selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CwfzFinancialSubjects record);

    int updateByPrimaryKey(CwfzFinancialSubjects record);

    String getDebitSubjectIdPositiveByTypeAndFormTransactionType(@Param("type") String type,@Param("form") String form,@Param("transactionType") String transactionType);

    String getDebitSubjectIdNegativeByTypeAndFormTransactionType(@Param("type") String type,@Param("form") String form,@Param("transactionType") String transactionType);

    String getCreditSubjectIdPositiveByTypeAndFormTransactionType(@Param("type") String type,@Param("form") String form,@Param("transactionType") String transactionType);

    String getCreditSubjectIdNegativeByTypeAndFormTransactionType(@Param("type") String type,@Param("form") String form,@Param("transactionType") String transactionType);

    /**
     * 根据type获取借方科目
     * @param type
     * @return
     */
    String selectDebitSubjectIdByType(String type);

    /**
     * 根据type获取贷方科目
     * @param type
     * @return
     */
    String selectCreditSubjectIdByType(String type);

    /**
     * 根据type和form获取借方科目
     * @param type
     * @param form
     * @return
     */
    String selectDebitSubjectIdByTypeAndForm(String type,String form);

    /**
     * 根据type和form获取贷方科目
     * @param type
     * @param form
     * @return
     */
    String selectCreditSubjectIdByTypeAndForm(String type,String form);
    /**
     * 获取DebitSubjectIdPositive
     * @param sellerId
     * @param country
     * @param form
     * @param transactionType
     * @return
     */
    String selectDebitSubjectIdPositiveBySellerIdAndCountryAndFormAndTransactionType(String sellerId,String country,String form,String transactionType);

    /**
     * 获取CreditSubjectIdPositive
     * @param sellerId
     * @param country
     * @param form
     * @param transactionType
     * @return
     */
    String selectCreditSubjectIdPositiveBySellerIdAndCountryAndFormAndTransactionType(String sellerId,String country,String form,String transactionType);

}